#!/bin/bash

# Creating a libphp5.a file is useful for profiling, but I couldnt get profiling data this way. See README.profiling.

# Call this from within a php directory, with the flags
#   -t Using threading
#   -pg Use profiling

# call like this
# 
# CFLAGS="-O0 -g" get_libphp5_archive -t -v --enable-debug
# Note that using -pg in CFLAGS, or --enable-maintainer-zts or --enable-embed is pointless, since I'll be playing with them.

CONFIGURE_ARGS="--enable-embed=shared --enable-debug"
THREADS=0
PROFILE=0
DONT_CLEAN=0
for var in $@
do
	if [ "-$var" = "--t" ]
	then
		CONFIGURE_ARGS="$CONFIGURE_ARGS --enable-maintainer-zts"
		THREADS=1
	elif [ "-$var" = "--pg" ]
	then
		MY_CFLAGS="$CFLAGS -pg -p -g -O0"
		PROFILE=1
	elif [ "-$var" = "--v" ]
	then
		set -x
	elif [ "-$var" = "--C" ]
	then
		DONT_CLEAN=1
	elif [ "-$var" = "---enable-embed" ]
	then
		true # IGNORE
	elif [ "-$var" = "---enable-embed=shared" ]
	then
		true # IGNORE
	elif [ "-$var" = "---enable-embed=static" ]
	then
		true # IGNORE
	elif [ "-$var" = "---enable-maintainer-zts" ]
	then
		true # IGNORE
	else
		CONFIGURE_ARGS="$CONFIGURE_ARGS $var"
	fi
done

# set the suffix and prefix
LIBPHP5_SUFFIX=""
PREFIX="/usr/local/php-static"
if [[ $PROFILE -eq 1 || $THREADS -eq 1 ]]
then
	LIBPHP5_SUFFIX="_";
fi
if [[ $PROFILE -eq 1 ]]
then
	LIBPHP5_SUFFIX="${LIBPHP5_SUFFIX}p";
	PREFIX="$PREFIX-profiled"
fi
if [[ $THREADS -eq 1 ]]
then
	LIBPHP5_SUFFIX="${LIBPHP5_SUFFIX}t";
	PREFIX="$PREFIX-threaded"
fi

LIBPHP5="libphp5$LIBPHP5_SUFFIX.a"

echo "The work to be done is commented out below, as I couldnt get set CFLAGS to work before configure"
exit -1

#CFLAGS=$MYCFLAGS ./configure $CONFIGURE_ARGS --prefix=$PREFIX
#if [[ $DONT_CLEAN -eq 0 ]]
#then
#	make clean
#fi
#make
#sudo make install
libtool --mode=link gcc -all-static -o $LIBPHP5 ext/libxml/.libs/libxml.o ext/pcre/pcrelib/.libs/pcre_chartables.o ext/pcre/pcrelib/.libs/pcre_ucp_searchfuncs.o ext/pcre/pcrelib/.libs/pcre_compile.o ext/pcre/pcrelib/.libs/pcre_config.o ext/pcre/pcrelib/.libs/pcre_exec.o ext/pcre/pcrelib/.libs/pcre_fullinfo.o ext/pcre/pcrelib/.libs/pcre_get.o ext/pcre/pcrelib/.libs/pcre_globals.o ext/pcre/pcrelib/.libs/pcre_info.o ext/pcre/pcrelib/.libs/pcre_maketables.o ext/pcre/pcrelib/.libs/pcre_newline.o ext/pcre/pcrelib/.libs/pcre_ord2utf8.o ext/pcre/pcrelib/.libs/pcre_refcount.o ext/pcre/pcrelib/.libs/pcre_study.o ext/pcre/pcrelib/.libs/pcre_tables.o ext/pcre/pcrelib/.libs/pcre_try_flipped.o ext/pcre/pcrelib/.libs/pcre_valid_utf8.o ext/pcre/pcrelib/.libs/pcre_version.o ext/pcre/pcrelib/.libs/pcre_xclass.o ext/pcre/.libs/php_pcre.o ext/ctype/.libs/ctype.o ext/date/.libs/php_date.o ext/date/lib/.libs/astro.o ext/date/lib/.libs/dow.o ext/date/lib/.libs/parse_date.o ext/date/lib/.libs/parse_tz.o ext/date/lib/.libs/timelib.o ext/date/lib/.libs/tm2unixtime.o ext/date/lib/.libs/unixtime2tm.o ext/dom/.libs/php_dom.o ext/dom/.libs/attr.o ext/dom/.libs/document.o ext/dom/.libs/domerrorhandler.o ext/dom/.libs/domstringlist.o ext/dom/.libs/domexception.o ext/dom/.libs/namelist.o ext/dom/.libs/processinginstruction.o ext/dom/.libs/cdatasection.o ext/dom/.libs/documentfragment.o ext/dom/.libs/domimplementation.o ext/dom/.libs/element.o ext/dom/.libs/node.o ext/dom/.libs/string_extend.o ext/dom/.libs/characterdata.o ext/dom/.libs/documenttype.o ext/dom/.libs/domimplementationlist.o ext/dom/.libs/entity.o ext/dom/.libs/nodelist.o ext/dom/.libs/text.o ext/dom/.libs/comment.o ext/dom/.libs/domconfiguration.o ext/dom/.libs/domimplementationsource.o ext/dom/.libs/entityreference.o ext/dom/.libs/notation.o ext/dom/.libs/xpath.o ext/dom/.libs/dom_iterators.o ext/dom/.libs/typeinfo.o ext/dom/.libs/domerror.o ext/dom/.libs/domlocator.o ext/dom/.libs/namednodemap.o ext/dom/.libs/userdatahandler.o ext/filter/.libs/filter.o ext/filter/.libs/sanitizing_filters.o ext/filter/.libs/logical_filters.o ext/filter/.libs/callback_filter.o ext/hash/.libs/hash.o ext/hash/.libs/hash_md.o ext/hash/.libs/hash_sha.o ext/hash/.libs/hash_ripemd.o ext/hash/.libs/hash_haval.o ext/hash/.libs/hash_tiger.o ext/hash/.libs/hash_gost.o ext/hash/.libs/hash_snefru.o ext/hash/.libs/hash_whirlpool.o ext/hash/.libs/hash_adler32.o ext/hash/.libs/hash_crc32.o ext/iconv/.libs/iconv.o ext/json/.libs/json.o ext/json/.libs/utf8_to_utf16.o ext/json/.libs/utf8_decode.o ext/json/.libs/JSON_parser.o ext/pdo/.libs/pdo.o ext/pdo/.libs/pdo_dbh.o ext/pdo/.libs/pdo_stmt.o ext/pdo/.libs/pdo_sql_parser.o ext/pdo/.libs/pdo_sqlstate.o ext/pdo_sqlite/.libs/pdo_sqlite.o ext/pdo_sqlite/.libs/sqlite_driver.o ext/pdo_sqlite/.libs/sqlite_statement.o ext/pdo_sqlite/sqlite/src/.libs/attach.o ext/pdo_sqlite/sqlite/src/.libs/auth.o ext/pdo_sqlite/sqlite/src/.libs/btree.o ext/pdo_sqlite/sqlite/src/.libs/build.o ext/pdo_sqlite/sqlite/src/.libs/callback.o ext/pdo_sqlite/sqlite/src/.libs/date.o ext/pdo_sqlite/sqlite/src/.libs/delete.o ext/pdo_sqlite/sqlite/src/.libs/expr.o ext/pdo_sqlite/sqlite/src/.libs/func.o ext/pdo_sqlite/sqlite/src/.libs/hash.o ext/pdo_sqlite/sqlite/src/.libs/insert.o ext/pdo_sqlite/sqlite/src/.libs/legacy.o ext/pdo_sqlite/sqlite/src/.libs/main.o ext/pdo_sqlite/sqlite/src/.libs/os_unix.o ext/pdo_sqlite/sqlite/src/.libs/os_win.o ext/pdo_sqlite/sqlite/src/.libs/os.o ext/pdo_sqlite/sqlite/src/.libs/pager.o ext/pdo_sqlite/sqlite/src/.libs/pragma.o ext/pdo_sqlite/sqlite/src/.libs/prepare.o ext/pdo_sqlite/sqlite/src/.libs/printf.o ext/pdo_sqlite/sqlite/src/.libs/random.o ext/pdo_sqlite/sqlite/src/.libs/select.o ext/pdo_sqlite/sqlite/src/.libs/table.o ext/pdo_sqlite/sqlite/src/.libs/tokenize.o ext/pdo_sqlite/sqlite/src/.libs/analyze.o ext/pdo_sqlite/sqlite/src/.libs/complete.o ext/pdo_sqlite/sqlite/src/.libs/trigger.o ext/pdo_sqlite/sqlite/src/.libs/update.o ext/pdo_sqlite/sqlite/src/.libs/utf.o ext/pdo_sqlite/sqlite/src/.libs/util.o ext/pdo_sqlite/sqlite/src/.libs/vacuum.o ext/pdo_sqlite/sqlite/src/.libs/vdbeapi.o ext/pdo_sqlite/sqlite/src/.libs/vdbeaux.o ext/pdo_sqlite/sqlite/src/.libs/vdbe.o ext/pdo_sqlite/sqlite/src/.libs/vdbemem.o ext/pdo_sqlite/sqlite/src/.libs/where.o ext/pdo_sqlite/sqlite/src/.libs/parse.o ext/pdo_sqlite/sqlite/src/.libs/opcodes.o ext/pdo_sqlite/sqlite/src/.libs/alter.o ext/pdo_sqlite/sqlite/src/.libs/vdbefifo.o ext/pdo_sqlite/sqlite/src/.libs/vtab.o ext/pdo_sqlite/sqlite/src/.libs/loadext.o ext/posix/.libs/posix.o ext/reflection/.libs/php_reflection.o ext/session/.libs/session.o ext/session/.libs/mod_files.o ext/session/.libs/mod_mm.o ext/session/.libs/mod_user.o ext/simplexml/.libs/simplexml.o ext/spl/.libs/php_spl.o ext/spl/.libs/spl_functions.o ext/spl/.libs/spl_engine.o ext/spl/.libs/spl_iterators.o ext/spl/.libs/spl_array.o ext/spl/.libs/spl_directory.o ext/spl/.libs/spl_sxe.o ext/spl/.libs/spl_exceptions.o ext/spl/.libs/spl_observer.o ext/sqlite/.libs/sqlite.o ext/sqlite/.libs/sess_sqlite.o ext/sqlite/.libs/pdo_sqlite2.o ext/sqlite/libsqlite/src/.libs/opcodes.o ext/sqlite/libsqlite/src/.libs/parse.o ext/sqlite/libsqlite/src/.libs/encode.o ext/sqlite/libsqlite/src/.libs/auth.o ext/sqlite/libsqlite/src/.libs/btree.o ext/sqlite/libsqlite/src/.libs/build.o ext/sqlite/libsqlite/src/.libs/delete.o ext/sqlite/libsqlite/src/.libs/expr.o ext/sqlite/libsqlite/src/.libs/func.o ext/sqlite/libsqlite/src/.libs/hash.o ext/sqlite/libsqlite/src/.libs/insert.o ext/sqlite/libsqlite/src/.libs/main.o ext/sqlite/libsqlite/src/.libs/os.o ext/sqlite/libsqlite/src/.libs/pager.o ext/sqlite/libsqlite/src/.libs/printf.o ext/sqlite/libsqlite/src/.libs/random.o ext/sqlite/libsqlite/src/.libs/select.o ext/sqlite/libsqlite/src/.libs/table.o ext/sqlite/libsqlite/src/.libs/tokenize.o ext/sqlite/libsqlite/src/.libs/update.o ext/sqlite/libsqlite/src/.libs/util.o ext/sqlite/libsqlite/src/.libs/vdbe.o ext/sqlite/libsqlite/src/.libs/attach.o ext/sqlite/libsqlite/src/.libs/btree_rb.o ext/sqlite/libsqlite/src/.libs/pragma.o ext/sqlite/libsqlite/src/.libs/vacuum.o ext/sqlite/libsqlite/src/.libs/copy.o ext/sqlite/libsqlite/src/.libs/vdbeaux.o ext/sqlite/libsqlite/src/.libs/date.o ext/sqlite/libsqlite/src/.libs/where.o ext/sqlite/libsqlite/src/.libs/trigger.o regex/.libs/regcomp.o regex/.libs/regexec.o regex/.libs/regerror.o regex/.libs/regfree.o ext/standard/.libs/array.o ext/standard/.libs/base64.o ext/standard/.libs/basic_functions.o ext/standard/.libs/browscap.o ext/standard/.libs/crc32.o ext/standard/.libs/crypt.o ext/standard/.libs/cyr_convert.o ext/standard/.libs/datetime.o ext/standard/.libs/dir.o ext/standard/.libs/dl.o ext/standard/.libs/dns.o ext/standard/.libs/exec.o ext/standard/.libs/file.o ext/standard/.libs/filestat.o ext/standard/.libs/flock_compat.o ext/standard/.libs/formatted_print.o ext/standard/.libs/fsock.o ext/standard/.libs/head.o ext/standard/.libs/html.o ext/standard/.libs/image.o ext/standard/.libs/info.o ext/standard/.libs/iptc.o ext/standard/.libs/lcg.o ext/standard/.libs/link.o ext/standard/.libs/mail.o ext/standard/.libs/math.o ext/standard/.libs/md5.o ext/standard/.libs/metaphone.o ext/standard/.libs/microtime.o ext/standard/.libs/pack.o ext/standard/.libs/pageinfo.o ext/standard/.libs/quot_print.o ext/standard/.libs/rand.o ext/standard/.libs/reg.o ext/standard/.libs/soundex.o ext/standard/.libs/string.o ext/standard/.libs/scanf.o ext/standard/.libs/syslog.o ext/standard/.libs/type.o ext/standard/.libs/uniqid.o ext/standard/.libs/url.o ext/standard/.libs/url_scanner.o ext/standard/.libs/var.o ext/standard/.libs/versioning.o ext/standard/.libs/assert.o ext/standard/.libs/strnatcmp.o ext/standard/.libs/levenshtein.o ext/standard/.libs/incomplete_class.o ext/standard/.libs/url_scanner_ex.o ext/standard/.libs/ftp_fopen_wrapper.o ext/standard/.libs/http_fopen_wrapper.o ext/standard/.libs/php_fopen_wrapper.o ext/standard/.libs/credits.o ext/standard/.libs/css.o ext/standard/.libs/var_unserializer.o ext/standard/.libs/ftok.o ext/standard/.libs/sha1.o ext/standard/.libs/user_filters.o ext/standard/.libs/uuencode.o ext/standard/.libs/filters.o ext/standard/.libs/proc_open.o ext/standard/.libs/streamsfuncs.o ext/standard/.libs/http.o ext/tokenizer/.libs/tokenizer.o ext/xml/.libs/xml.o ext/xml/.libs/compat.o ext/xmlreader/.libs/php_xmlreader.o ext/xmlwriter/.libs/php_xmlwriter.o TSRM/.libs/TSRM.o TSRM/.libs/tsrm_strtok_r.o TSRM/.libs/tsrm_virtual_cwd.o main/.libs/main.o main/.libs/snprintf.o main/.libs/spprintf.o main/.libs/php_sprintf.o main/.libs/safe_mode.o main/.libs/fopen_wrappers.o main/.libs/alloca.o main/.libs/php_scandir.o main/.libs/php_ini.o main/.libs/SAPI.o main/.libs/rfc1867.o main/.libs/php_content_types.o main/.libs/strlcpy.o main/.libs/strlcat.o main/.libs/mergesort.o main/.libs/reentrancy.o main/.libs/php_variables.o main/.libs/php_ticks.o main/.libs/network.o main/.libs/php_open_temporary_file.o main/.libs/php_logos.o main/.libs/output.o main/streams/.libs/streams.o main/streams/.libs/cast.o main/streams/.libs/memory.o main/streams/.libs/filter.o main/streams/.libs/plain_wrapper.o main/streams/.libs/userspace.o main/streams/.libs/transports.o main/streams/.libs/xp_socket.o main/streams/.libs/mmap.o Zend/.libs/zend_language_parser.o Zend/.libs/zend_language_scanner.o Zend/.libs/zend_ini_parser.o Zend/.libs/zend_ini_scanner.o Zend/.libs/zend_alloc.o Zend/.libs/zend_compile.o Zend/.libs/zend_constants.o Zend/.libs/zend_dynamic_array.o Zend/.libs/zend_execute_API.o Zend/.libs/zend_highlight.o Zend/.libs/zend_llist.o Zend/.libs/zend_opcode.o Zend/.libs/zend_operators.o Zend/.libs/zend_ptr_stack.o Zend/.libs/zend_stack.o Zend/.libs/zend_variables.o Zend/.libs/zend.o Zend/.libs/zend_API.o Zend/.libs/zend_extensions.o Zend/.libs/zend_hash.o Zend/.libs/zend_list.o Zend/.libs/zend_indent.o Zend/.libs/zend_builtin_functions.o Zend/.libs/zend_sprintf.o Zend/.libs/zend_ini.o Zend/.libs/zend_qsort.o Zend/.libs/zend_multibyte.o Zend/.libs/zend_ts_hash.o Zend/.libs/zend_stream.o Zend/.libs/zend_iterators.o Zend/.libs/zend_interfaces.o Zend/.libs/zend_exceptions.o Zend/.libs/zend_strtod.o Zend/.libs/zend_objects.o Zend/.libs/zend_object_handlers.o Zend/.libs/zend_objects_API.o Zend/.libs/zend_default_classes.o Zend/.libs/zend_execute.o sapi/embed/.libs/php_embed.o main/.libs/internal_functions.o
#ar cr $LIBPHP5 ext/libxml/.libs/libxml.o ext/pcre/pcrelib/.libs/pcre_chartables.o ext/pcre/pcrelib/.libs/pcre_ucp_searchfuncs.o ext/pcre/pcrelib/.libs/pcre_compile.o ext/pcre/pcrelib/.libs/pcre_config.o ext/pcre/pcrelib/.libs/pcre_exec.o ext/pcre/pcrelib/.libs/pcre_fullinfo.o ext/pcre/pcrelib/.libs/pcre_get.o ext/pcre/pcrelib/.libs/pcre_globals.o ext/pcre/pcrelib/.libs/pcre_info.o ext/pcre/pcrelib/.libs/pcre_maketables.o ext/pcre/pcrelib/.libs/pcre_newline.o ext/pcre/pcrelib/.libs/pcre_ord2utf8.o ext/pcre/pcrelib/.libs/pcre_refcount.o ext/pcre/pcrelib/.libs/pcre_study.o ext/pcre/pcrelib/.libs/pcre_tables.o ext/pcre/pcrelib/.libs/pcre_try_flipped.o ext/pcre/pcrelib/.libs/pcre_valid_utf8.o ext/pcre/pcrelib/.libs/pcre_version.o ext/pcre/pcrelib/.libs/pcre_xclass.o ext/pcre/.libs/php_pcre.o ext/ctype/.libs/ctype.o ext/date/.libs/php_date.o ext/date/lib/.libs/astro.o ext/date/lib/.libs/dow.o ext/date/lib/.libs/parse_date.o ext/date/lib/.libs/parse_tz.o ext/date/lib/.libs/timelib.o ext/date/lib/.libs/tm2unixtime.o ext/date/lib/.libs/unixtime2tm.o ext/dom/.libs/php_dom.o ext/dom/.libs/attr.o ext/dom/.libs/document.o ext/dom/.libs/domerrorhandler.o ext/dom/.libs/domstringlist.o ext/dom/.libs/domexception.o ext/dom/.libs/namelist.o ext/dom/.libs/processinginstruction.o ext/dom/.libs/cdatasection.o ext/dom/.libs/documentfragment.o ext/dom/.libs/domimplementation.o ext/dom/.libs/element.o ext/dom/.libs/node.o ext/dom/.libs/string_extend.o ext/dom/.libs/characterdata.o ext/dom/.libs/documenttype.o ext/dom/.libs/domimplementationlist.o ext/dom/.libs/entity.o ext/dom/.libs/nodelist.o ext/dom/.libs/text.o ext/dom/.libs/comment.o ext/dom/.libs/domconfiguration.o ext/dom/.libs/domimplementationsource.o ext/dom/.libs/entityreference.o ext/dom/.libs/notation.o ext/dom/.libs/xpath.o ext/dom/.libs/dom_iterators.o ext/dom/.libs/typeinfo.o ext/dom/.libs/domerror.o ext/dom/.libs/domlocator.o ext/dom/.libs/namednodemap.o ext/dom/.libs/userdatahandler.o ext/filter/.libs/filter.o ext/filter/.libs/sanitizing_filters.o ext/filter/.libs/logical_filters.o ext/filter/.libs/callback_filter.o ext/hash/.libs/hash.o ext/hash/.libs/hash_md.o ext/hash/.libs/hash_sha.o ext/hash/.libs/hash_ripemd.o ext/hash/.libs/hash_haval.o ext/hash/.libs/hash_tiger.o ext/hash/.libs/hash_gost.o ext/hash/.libs/hash_snefru.o ext/hash/.libs/hash_whirlpool.o ext/hash/.libs/hash_adler32.o ext/hash/.libs/hash_crc32.o ext/iconv/.libs/iconv.o ext/json/.libs/json.o ext/json/.libs/utf8_to_utf16.o ext/json/.libs/utf8_decode.o ext/json/.libs/JSON_parser.o ext/pdo/.libs/pdo.o ext/pdo/.libs/pdo_dbh.o ext/pdo/.libs/pdo_stmt.o ext/pdo/.libs/pdo_sql_parser.o ext/pdo/.libs/pdo_sqlstate.o ext/pdo_sqlite/.libs/pdo_sqlite.o ext/pdo_sqlite/.libs/sqlite_driver.o ext/pdo_sqlite/.libs/sqlite_statement.o ext/pdo_sqlite/sqlite/src/.libs/attach.o ext/pdo_sqlite/sqlite/src/.libs/auth.o ext/pdo_sqlite/sqlite/src/.libs/btree.o ext/pdo_sqlite/sqlite/src/.libs/build.o ext/pdo_sqlite/sqlite/src/.libs/callback.o ext/pdo_sqlite/sqlite/src/.libs/date.o ext/pdo_sqlite/sqlite/src/.libs/delete.o ext/pdo_sqlite/sqlite/src/.libs/expr.o ext/pdo_sqlite/sqlite/src/.libs/func.o ext/pdo_sqlite/sqlite/src/.libs/hash.o ext/pdo_sqlite/sqlite/src/.libs/insert.o ext/pdo_sqlite/sqlite/src/.libs/legacy.o ext/pdo_sqlite/sqlite/src/.libs/main.o ext/pdo_sqlite/sqlite/src/.libs/os_unix.o ext/pdo_sqlite/sqlite/src/.libs/os_win.o ext/pdo_sqlite/sqlite/src/.libs/os.o ext/pdo_sqlite/sqlite/src/.libs/pager.o ext/pdo_sqlite/sqlite/src/.libs/pragma.o ext/pdo_sqlite/sqlite/src/.libs/prepare.o ext/pdo_sqlite/sqlite/src/.libs/printf.o ext/pdo_sqlite/sqlite/src/.libs/random.o ext/pdo_sqlite/sqlite/src/.libs/select.o ext/pdo_sqlite/sqlite/src/.libs/table.o ext/pdo_sqlite/sqlite/src/.libs/tokenize.o ext/pdo_sqlite/sqlite/src/.libs/analyze.o ext/pdo_sqlite/sqlite/src/.libs/complete.o ext/pdo_sqlite/sqlite/src/.libs/trigger.o ext/pdo_sqlite/sqlite/src/.libs/update.o ext/pdo_sqlite/sqlite/src/.libs/utf.o ext/pdo_sqlite/sqlite/src/.libs/util.o ext/pdo_sqlite/sqlite/src/.libs/vacuum.o ext/pdo_sqlite/sqlite/src/.libs/vdbeapi.o ext/pdo_sqlite/sqlite/src/.libs/vdbeaux.o ext/pdo_sqlite/sqlite/src/.libs/vdbe.o ext/pdo_sqlite/sqlite/src/.libs/vdbemem.o ext/pdo_sqlite/sqlite/src/.libs/where.o ext/pdo_sqlite/sqlite/src/.libs/parse.o ext/pdo_sqlite/sqlite/src/.libs/opcodes.o ext/pdo_sqlite/sqlite/src/.libs/alter.o ext/pdo_sqlite/sqlite/src/.libs/vdbefifo.o ext/pdo_sqlite/sqlite/src/.libs/vtab.o ext/pdo_sqlite/sqlite/src/.libs/loadext.o ext/posix/.libs/posix.o ext/reflection/.libs/php_reflection.o ext/session/.libs/session.o ext/session/.libs/mod_files.o ext/session/.libs/mod_mm.o ext/session/.libs/mod_user.o ext/simplexml/.libs/simplexml.o ext/spl/.libs/php_spl.o ext/spl/.libs/spl_functions.o ext/spl/.libs/spl_engine.o ext/spl/.libs/spl_iterators.o ext/spl/.libs/spl_array.o ext/spl/.libs/spl_directory.o ext/spl/.libs/spl_sxe.o ext/spl/.libs/spl_exceptions.o ext/spl/.libs/spl_observer.o ext/sqlite/.libs/sqlite.o ext/sqlite/.libs/sess_sqlite.o ext/sqlite/.libs/pdo_sqlite2.o ext/sqlite/libsqlite/src/.libs/opcodes.o ext/sqlite/libsqlite/src/.libs/parse.o ext/sqlite/libsqlite/src/.libs/encode.o ext/sqlite/libsqlite/src/.libs/auth.o ext/sqlite/libsqlite/src/.libs/btree.o ext/sqlite/libsqlite/src/.libs/build.o ext/sqlite/libsqlite/src/.libs/delete.o ext/sqlite/libsqlite/src/.libs/expr.o ext/sqlite/libsqlite/src/.libs/func.o ext/sqlite/libsqlite/src/.libs/hash.o ext/sqlite/libsqlite/src/.libs/insert.o ext/sqlite/libsqlite/src/.libs/main.o ext/sqlite/libsqlite/src/.libs/os.o ext/sqlite/libsqlite/src/.libs/pager.o ext/sqlite/libsqlite/src/.libs/printf.o ext/sqlite/libsqlite/src/.libs/random.o ext/sqlite/libsqlite/src/.libs/select.o ext/sqlite/libsqlite/src/.libs/table.o ext/sqlite/libsqlite/src/.libs/tokenize.o ext/sqlite/libsqlite/src/.libs/update.o ext/sqlite/libsqlite/src/.libs/util.o ext/sqlite/libsqlite/src/.libs/vdbe.o ext/sqlite/libsqlite/src/.libs/attach.o ext/sqlite/libsqlite/src/.libs/btree_rb.o ext/sqlite/libsqlite/src/.libs/pragma.o ext/sqlite/libsqlite/src/.libs/vacuum.o ext/sqlite/libsqlite/src/.libs/copy.o ext/sqlite/libsqlite/src/.libs/vdbeaux.o ext/sqlite/libsqlite/src/.libs/date.o ext/sqlite/libsqlite/src/.libs/where.o ext/sqlite/libsqlite/src/.libs/trigger.o regex/.libs/regcomp.o regex/.libs/regexec.o regex/.libs/regerror.o regex/.libs/regfree.o ext/standard/.libs/array.o ext/standard/.libs/base64.o ext/standard/.libs/basic_functions.o ext/standard/.libs/browscap.o ext/standard/.libs/crc32.o ext/standard/.libs/crypt.o ext/standard/.libs/cyr_convert.o ext/standard/.libs/datetime.o ext/standard/.libs/dir.o ext/standard/.libs/dl.o ext/standard/.libs/dns.o ext/standard/.libs/exec.o ext/standard/.libs/file.o ext/standard/.libs/filestat.o ext/standard/.libs/flock_compat.o ext/standard/.libs/formatted_print.o ext/standard/.libs/fsock.o ext/standard/.libs/head.o ext/standard/.libs/html.o ext/standard/.libs/image.o ext/standard/.libs/info.o ext/standard/.libs/iptc.o ext/standard/.libs/lcg.o ext/standard/.libs/link.o ext/standard/.libs/mail.o ext/standard/.libs/math.o ext/standard/.libs/md5.o ext/standard/.libs/metaphone.o ext/standard/.libs/microtime.o ext/standard/.libs/pack.o ext/standard/.libs/pageinfo.o ext/standard/.libs/quot_print.o ext/standard/.libs/rand.o ext/standard/.libs/reg.o ext/standard/.libs/soundex.o ext/standard/.libs/string.o ext/standard/.libs/scanf.o ext/standard/.libs/syslog.o ext/standard/.libs/type.o ext/standard/.libs/uniqid.o ext/standard/.libs/url.o ext/standard/.libs/url_scanner.o ext/standard/.libs/var.o ext/standard/.libs/versioning.o ext/standard/.libs/assert.o ext/standard/.libs/strnatcmp.o ext/standard/.libs/levenshtein.o ext/standard/.libs/incomplete_class.o ext/standard/.libs/url_scanner_ex.o ext/standard/.libs/ftp_fopen_wrapper.o ext/standard/.libs/http_fopen_wrapper.o ext/standard/.libs/php_fopen_wrapper.o ext/standard/.libs/credits.o ext/standard/.libs/css.o ext/standard/.libs/var_unserializer.o ext/standard/.libs/ftok.o ext/standard/.libs/sha1.o ext/standard/.libs/user_filters.o ext/standard/.libs/uuencode.o ext/standard/.libs/filters.o ext/standard/.libs/proc_open.o ext/standard/.libs/streamsfuncs.o ext/standard/.libs/http.o ext/tokenizer/.libs/tokenizer.o ext/xml/.libs/xml.o ext/xml/.libs/compat.o ext/xmlreader/.libs/php_xmlreader.o ext/xmlwriter/.libs/php_xmlwriter.o TSRM/.libs/TSRM.o TSRM/.libs/tsrm_strtok_r.o TSRM/.libs/tsrm_virtual_cwd.o main/.libs/main.o main/.libs/snprintf.o main/.libs/spprintf.o main/.libs/php_sprintf.o main/.libs/safe_mode.o main/.libs/fopen_wrappers.o main/.libs/alloca.o main/.libs/php_scandir.o main/.libs/php_ini.o main/.libs/SAPI.o main/.libs/rfc1867.o main/.libs/php_content_types.o main/.libs/strlcpy.o main/.libs/strlcat.o main/.libs/mergesort.o main/.libs/reentrancy.o main/.libs/php_variables.o main/.libs/php_ticks.o main/.libs/network.o main/.libs/php_open_temporary_file.o main/.libs/php_logos.o main/.libs/output.o main/streams/.libs/streams.o main/streams/.libs/cast.o main/streams/.libs/memory.o main/streams/.libs/filter.o main/streams/.libs/plain_wrapper.o main/streams/.libs/userspace.o main/streams/.libs/transports.o main/streams/.libs/xp_socket.o main/streams/.libs/mmap.o Zend/.libs/zend_language_parser.o Zend/.libs/zend_language_scanner.o Zend/.libs/zend_ini_parser.o Zend/.libs/zend_ini_scanner.o Zend/.libs/zend_alloc.o Zend/.libs/zend_compile.o Zend/.libs/zend_constants.o Zend/.libs/zend_dynamic_array.o Zend/.libs/zend_execute_API.o Zend/.libs/zend_highlight.o Zend/.libs/zend_llist.o Zend/.libs/zend_opcode.o Zend/.libs/zend_operators.o Zend/.libs/zend_ptr_stack.o Zend/.libs/zend_stack.o Zend/.libs/zend_variables.o Zend/.libs/zend.o Zend/.libs/zend_API.o Zend/.libs/zend_extensions.o Zend/.libs/zend_hash.o Zend/.libs/zend_list.o Zend/.libs/zend_indent.o Zend/.libs/zend_builtin_functions.o Zend/.libs/zend_sprintf.o Zend/.libs/zend_ini.o Zend/.libs/zend_qsort.o Zend/.libs/zend_multibyte.o Zend/.libs/zend_ts_hash.o Zend/.libs/zend_stream.o Zend/.libs/zend_iterators.o Zend/.libs/zend_interfaces.o Zend/.libs/zend_exceptions.o Zend/.libs/zend_strtod.o Zend/.libs/zend_objects.o Zend/.libs/zend_object_handlers.o Zend/.libs/zend_objects_API.o Zend/.libs/zend_default_classes.o Zend/.libs/zend_execute.o sapi/embed/.libs/php_embed.o main/.libs/internal_functions.o 
#sudo cp $LIBPHP5 $PREFIX/lib
sudo libtool --mode=install install $LIBPHP5 $PREFIX/lib
